logic: Added PCH support to CDB source groups (issue #311)
* added PCH Flags list and checkbox to reuse compiler flags and cdb flags to source group setup * added UI tests for C++ and CDB source groups
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# get absolute path to parent directory of script
|
||||
MY_PATH=`dirname "$0"`
|
||||
if [[ "${MY_PATH}" != *\\* ]]
|
||||
then
|
||||
cd $MY_PATH
|
||||
MY_PATH=`pwd`
|
||||
fi
|
||||
MY_PATH="${MY_PATH//\\//}"
|
||||
|
||||
SRC_PATH=$MY_PATH/data
|
||||
WORKING_COPY_PATH=$MY_PATH/working_copy
|
||||
|
||||
mkdir -p $WORKING_COPY_PATH
|
||||
|
||||
cp -a $SRC_PATH/. $WORKING_COPY_PATH
|
||||
|
||||
echo "Setup Complete"
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# get absolute path to parent directory of script
|
||||
MY_PATH=`dirname "$0"`
|
||||
if [[ "${MY_PATH}" != *\\* ]]
|
||||
then
|
||||
cd $MY_PATH
|
||||
MY_PATH=`pwd`
|
||||
fi
|
||||
MY_PATH="${MY_PATH//\\//}"
|
||||
|
||||
WORKING_COPY_PATH=$MY_PATH/working_copy
|
||||
|
||||
rm -rf $WORKING_COPY_PATH
|
||||
|
||||
echo "Teardown Complete"
|
||||
@@ -0,0 +1,25 @@
|
||||
* Run "1_setup.sh"
|
||||
* Start up Sourcetrail
|
||||
* Click "New Project"
|
||||
* Enter a project name
|
||||
* Set "./working_copy" as project location
|
||||
* Click "Add Source Group"
|
||||
* Select "C++" -> Empty C++ Source Group"
|
||||
* Click "Next"
|
||||
* Click "Next"
|
||||
* Add "./src" to "Files & Directories to Index"
|
||||
* Add "**/Foo.h" to "Excluded Files & Directories"
|
||||
* Click "Next"
|
||||
* Click "Next"
|
||||
* Click "Next"
|
||||
* Add "-DCOMPILER_FLAG" to "Compiler Flags"
|
||||
* Add "./src/pch.h" to "Precompiled Header File"
|
||||
* Add "-DPCH_FLAG" to "Precompiled Header Flags"
|
||||
* Click "Next"
|
||||
* Click "Create"
|
||||
* Validate "All files" is the only option selectable
|
||||
* Click "Start"
|
||||
* Validate Project indexed without error
|
||||
* Click "OK"
|
||||
* Close Sourcetrail
|
||||
* Run "2_teardown.sh"
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef FOO_H
|
||||
#define FOO_H
|
||||
|
||||
#include "FooBar.h"
|
||||
|
||||
class Bar : public FooBar
|
||||
{
|
||||
};
|
||||
|
||||
#endif // FOO_H
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef BAR_H
|
||||
#define BAR_H
|
||||
|
||||
#include "FooBar.h"
|
||||
|
||||
class Foo : public FooBar
|
||||
{
|
||||
};
|
||||
|
||||
#endif // FOO_BAR_H
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef FOO_BAR_H
|
||||
#define FOO_BAR_H
|
||||
|
||||
#ifdef COMPILER_FLAG
|
||||
|
||||
class FooBar
|
||||
{
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // FOO_BAR_H
|
||||
@@ -0,0 +1,7 @@
|
||||
#include "pch.h"
|
||||
|
||||
void test()
|
||||
{
|
||||
Foo foo;
|
||||
Bar bar;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
#ifdef PCH_FLAG
|
||||
|
||||
#include "Foo.h"
|
||||
#include "Bar.h"
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user