[cmake-commits] king committed CMakeLists.txt 1.61 1.62
complex_nobuild.cxx NONE 1.1
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Nov 19 14:27:45 EST 2007
Update of /cvsroot/CMake/CMake/Tests/Complex/Executable
In directory public:/mounts/ram/cvs-serv30606/Tests/Complex/Executable
Modified Files:
CMakeLists.txt
Added Files:
complex_nobuild.cxx
Log Message:
ENH: Adding test for using HEADER_FILE_ONLY to avoid building a .cxx file.
--- NEW FILE: complex_nobuild.cxx ---
#error "This file should not be compiled."
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Complex/Executable/CMakeLists.txt,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- CMakeLists.txt 16 May 2007 15:40:53 -0000 1.61
+++ CMakeLists.txt 19 Nov 2007 19:27:43 -0000 1.62
@@ -19,10 +19,14 @@
SET(COMPLEX_LIBS CMakeTestLibrary;CMakeTestLibraryShared;CMakeTestCLibraryShared)
LINK_LIBRARIES(${COMPLEX_LIBS})
+# Test forcing a .cxx file to not build.
+SET_SOURCE_FILES_PROPERTIES(complex_nobuild.cxx PROPERTIES
+ HEADER_FILE_ONLY 1)
+
ADD_EXECUTABLE(A A.cxx A.hh A.h A.txt)
ADD_EXECUTABLE(complex complex testcflags.c )
# Sub1/NameConflictTest.c Sub2/NameConflictTest.c)
-ADD_EXECUTABLE(complex.file complex.file.cxx)
+ADD_EXECUTABLE(complex.file complex.file.cxx complex_nobuild.cxx)
IF(COMPLEX_TEST_CMAKELIB)
TARGET_LINK_LIBRARIES(complex CMakeLib cmsys cmexpat cmzlib cmtar)
ENDIF(COMPLEX_TEST_CMAKELIB)
More information about the Cmake-commits
mailing list