Fix for bug#10798. VS10 did not append -I flags with COMPILE_FLAGS prop.
This fix adds a test for this case for all generators.
This commit is contained in:
parent
5764739f52
commit
7815e90e21
|
@ -299,7 +299,12 @@ cmVisualStudioGeneratorOptions
|
||||||
{
|
{
|
||||||
fout << "<" << m->first << ">";
|
fout << "<" << m->first << ">";
|
||||||
}
|
}
|
||||||
fout << m->second << "</" << m->first << ">\n";
|
fout << m->second;
|
||||||
|
if (m->first == "AdditionalIncludeDirectories")
|
||||||
|
{
|
||||||
|
fout << ";%(AdditionalIncludeDirectories)";
|
||||||
|
}
|
||||||
|
fout << "</" << m->first << ">\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -2043,6 +2043,18 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
|
||||||
ADD_TEST_MACRO(CompileCommandOutput
|
ADD_TEST_MACRO(CompileCommandOutput
|
||||||
"${CMake_BINARY_DIR}/Tests/CMakeLib/runcompilecommands")
|
"${CMake_BINARY_DIR}/Tests/CMakeLib/runcompilecommands")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
ADD_TEST(IncludeDirectories ${CMAKE_CTEST_COMMAND}
|
||||||
|
--build-and-test
|
||||||
|
"${CMake_SOURCE_DIR}/Tests/IncludeDirectories"
|
||||||
|
"${CMake_BINARY_DIR}/Tests/IncludeDirectories"
|
||||||
|
--build-two-config
|
||||||
|
--build-generator ${CMAKE_TEST_GENERATOR}
|
||||||
|
--build-project IncludeDirectories
|
||||||
|
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
|
||||||
|
--test-command IncludeDirectories)
|
||||||
|
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/IncludeDirectories")
|
||||||
|
|
||||||
ENDIF(BUILD_TESTING)
|
ENDIF(BUILD_TESTING)
|
||||||
|
|
||||||
SUBDIRS(CMakeTests)
|
SUBDIRS(CMakeTests)
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
cmake_minimum_required (VERSION 2.6)
|
||||||
|
project(IncludeDirectories)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "\"-I${CMAKE_SOURCE_DIR}/Flags\"")
|
||||||
|
include_directories(${CMAKE_SOURCE_DIR}/IncDir)
|
||||||
|
set_source_files_properties(main.cpp PROPERTIES COMPILE_FLAGS
|
||||||
|
"\"-I${CMAKE_SOURCE_DIR}/SrcProp\"")
|
||||||
|
add_executable(IncludeDirectories main.cpp)
|
||||||
|
set_target_properties(IncludeDirectories
|
||||||
|
PROPERTIES COMPILE_FLAGS "\"-I${CMAKE_SOURCE_DIR}/TarProp\"")
|
|
@ -0,0 +1 @@
|
||||||
|
// include Flags.h
|
|
@ -0,0 +1 @@
|
||||||
|
// include IncDir.h
|
|
@ -0,0 +1 @@
|
||||||
|
// include SrcProp.h
|
|
@ -0,0 +1 @@
|
||||||
|
// include TarProp.h
|
|
@ -0,0 +1,9 @@
|
||||||
|
#include "Flags.h"
|
||||||
|
#include "IncDir.h"
|
||||||
|
#include "SrcProp.h"
|
||||||
|
#include "TarProp.h"
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue