aboutsummaryrefslogtreecommitdiff
path: root/tests/cmake/target_js/CMakeLists.txt
blob: 860b70a9f34524579ed60c2e7c736eb0b930d042 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
cmake_minimum_required(VERSION 2.8)

project(hello_world.js)

file(GLOB sourceFiles ../../hello_world.cpp)

if (CMAKE_BUILD_TYPE STREQUAL Debug)
	SET(linkFlags "")
else() # Either MinSizeRel, RelWithDebInfo or Release, all which run with optimizations enabled.
	SET(linkFlags "-O2")
endif()

add_executable(hello_world.js ${sourceFiles})
set_target_properties(hello_world.js PROPERTIES LINK_FLAGS "${linkFlags}")