0

So I am used to IDE's like CLion where we use CMakeLists.txt to tell the compiler flags, set things etc. Is there any way to do that in Coderunner? I see that I can add flags, but is there any way add the example code below?

cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -Wall")
if(APPLE)
  set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl")
endif()
find_package(OpenSSL REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})
add_executable(project-test main.cpp)
target_link_libraries(project-test ${OPENSSL_CRYPTO_LIBRARIES})
usr1234567
  • 21,601
  • 16
  • 108
  • 128
simonkaspers1
  • 616
  • 4
  • 16
  • Sure you can, just edit the file. This might help: http://stackoverflow.com/questions/11783932/how-to-add-linker-or-compile-flag-in-cmake-file – usr1234567 Sep 15 '15 at 09:52
  • @usr1234567, But how do I tell coderunner to look into that file? That is the problem – simonkaspers1 Sep 15 '15 at 09:57
  • Just let it execute the Makefile or whatever buildsystem you use. It will check whether the CMake file was modified and re-run CMake's configure. – usr1234567 Sep 15 '15 at 10:00

0 Answers0