summaryrefslogtreecommitdiff
blob: a8222f0747132a6a62413c150ef68340c3c4d18a (plain)
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
34
35
36
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,9 +1,7 @@
 cmake_minimum_required(VERSION 2.8.11)
 project(PSL-NATIVE)
 
-# Can't use add_compile_options with 2.8.11
-set(CMAKE_BUILD_TYPE "Release")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror -fstack-protector-strong -fpie -DFORTIFY_SOURCE=2 -O2")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 
 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,relro,-z,now")
@@ -11,15 +9,11 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl")
 endif()
 
-set(LIBRARY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/../powershell-unix")
+option(TESTING "Enable tests" OFF)
 
-if (CMAKE_SYSTEM_PROCESSOR MATCHES "arm*")
-    message(STATUS "Building for ARM, no tests")
-    add_subdirectory(src)
-else ()
-    # test in BUILD_DIR
-    message(STATUS "Tests enabled")
-    enable_testing()
-    add_subdirectory(src)
-    add_subdirectory(test)
-endif ()
+add_subdirectory(src)
+
+if(TESTING)
+  enable_testing()
+  add_subdirectory(test)
+endif()