File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,11 +34,14 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/csclng++.c
3434add_definitions (-iquote ${CMAKE_CURRENT_SOURCE_DIR} )
3535add_definitions (-iquote ${CMAKE_SOURCE_DIR} )
3636
37+ # compile the common code base only once (as a static library)
38+ add_library (cswrap STATIC cswrap-core.c ../cswrap/src/cswrap-util.c )
39+ link_libraries (cswrap )
40+
3741# compile and install executables
38- add_executable (cscppc cscppc.c cswrap-core.c ../cswrap/src/cswrap-util.c )
39- add_executable (csclng csclng.c cswrap-core.c ../cswrap/src/cswrap-util.c )
40- add_executable (csgcca csgcca.c cswrap-core.c ../cswrap/src/cswrap-util.c )
41- add_executable (csclng++ ${CMAKE_CURRENT_BINARY_DIR} /csclng++.c
42- cswrap-core.c ../cswrap/src/cswrap-util.c )
43- add_executable (csmatch csmatch.c cswrap-core.c ../cswrap/src/cswrap-util.c )
42+ add_executable (cscppc cscppc.c )
43+ add_executable (csclng csclng.c )
44+ add_executable (csclng++ ${CMAKE_CURRENT_BINARY_DIR} /csclng++.c )
45+ add_executable (csgcca csgcca.c )
46+ add_executable (csmatch csmatch.c )
4447install (TARGETS cscppc csclng csclng++ csgcca csmatch DESTINATION bin)
You can’t perform that action at this time.
0 commit comments