mirror of
https://github.com/crioux/turbo-linecount.git
synced 2024-10-27 17:24:01 +00:00
build
This commit is contained in:
parent
2c86bfd244
commit
a73ac7bef6
@ -6,6 +6,7 @@ IF(MSVC)
|
|||||||
SET(CMAKE_CXX_FLAGS_RELEASE "/Ox /Ob2")
|
SET(CMAKE_CXX_FLAGS_RELEASE "/Ox /Ob2")
|
||||||
SET(CMAKE_C_FLAGS_RELEASE "/Ox /Ob2")
|
SET(CMAKE_C_FLAGS_RELEASE "/Ox /Ob2")
|
||||||
ELSE()
|
ELSE()
|
||||||
|
FIND_PACKAGE (Threads REQUIRED)
|
||||||
SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
||||||
SET(CMAKE_C_FLAGS_RELEASE "-O3")
|
SET(CMAKE_C_FLAGS_RELEASE "-O3")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
@ -13,7 +14,13 @@ ENDIF()
|
|||||||
ADD_LIBRARY (linecount SHARED src/turbo_linecount.cpp src/turbo_linecount.h)
|
ADD_LIBRARY (linecount SHARED src/turbo_linecount.cpp src/turbo_linecount.h)
|
||||||
ADD_LIBRARY (linecount_static STATIC src/turbo_linecount.cpp src/turbo_linecount.h)
|
ADD_LIBRARY (linecount_static STATIC src/turbo_linecount.cpp src/turbo_linecount.h)
|
||||||
ADD_EXECUTABLE (lc src/main.cpp)
|
ADD_EXECUTABLE (lc src/main.cpp)
|
||||||
TARGET_LINK_LIBRARIES (lc linecount_static)
|
|
||||||
|
IF(THREADS_HAVE_PTHREAD_ARG)
|
||||||
|
SET_PROPERTY(TARGET lc PROPERTY COMPILE_OPTIONS "-pthread")
|
||||||
|
SET_PROPERTY(TARGET lc PROPERTY INTERFACE_COMPILE_OPTIONS "-pthread")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES (lc linecount_static ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
INSTALL(TARGETS lc
|
INSTALL(TARGETS lc
|
||||||
DESTINATION "bin"
|
DESTINATION "bin"
|
||||||
|
Loading…
Reference in New Issue
Block a user