-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
33 lines (25 loc) · 1.01 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
cmake_minimum_required(VERSION 3.10)
project(String_Compare_Goods)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
#set(CMAKE_SYSTEM_NAME Linux)
#set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
# if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.30)
# cmake_policy(SET CMP0167 NEW)
# endif()
# find_package(Boost)
# if(Boost_FOUND)
# include_directories(${Boost_INCLUDE_DIRS})
# add_executable(example example.cpp soft_string_compare/soft_string_compare.cpp)
# target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})
# endif()
add_executable(example example.cpp soft_string_compare/soft_string_compare.cpp)
# Emscripten-specific settings
if(EMSCRIPTEN)
set(CMAKE_EXECUTABLE_SUFFIX ".html")
set_target_properties(example PROPERTIES LINK_FLAGS "-s WASM=1 -s NO_EXIT_RUNTIME -s EXPORTED_RUNTIME_METHODS=['ccall','cwrap'] --shell-file /usr/lib/emscripten/src/shell_minimal.html")
endif()