[CMake] Parameter LANGUAGE in set_source_files_properties

zia at itsib.ru zia at itsib.ru
Mon Jul 7 04:38:56 EDT 2008


I have a little problem.
I have project's tree and several files with c extension and I want
to compile one file by g++ compiler and not c compiler.

./Trunk
|
 ->TEST
 |
  ->test.c
  ->test1.c
  ->test2.c
  ->CMakeLists.txt
|
 ->CMakeLists.txt

---------------------------------------------
I make in root CMakeLists.txt
PROJECT (TEST C CXX)

add_executable(myexe ${COMMON_SRC})
---------------------------------------------
and CMakeLists.txt in TEST's folder

SET(COMMON_SRC
test.c
test1.c
)

SET_SOURCE_FILES_PROPERTIES(
test2.c
PROPERTIES 
LANGUAGE CXX
)

test.c and test1.c files are right compiling by C cmpiler  but test2.c is not compile CXX compiler this file is not build at all.
What do I do wrong?

I have a cmake project and now 2.6.




More information about the CMake mailing list