From c83e2cdb0561946f2725a6b8b4b2c19f39670bef Mon Sep 17 00:00:00 2001 From: Franziska Wegner <57569315+franziska-wegner@users.noreply.github.com> Date: Fri, 5 Jan 2024 07:41:59 -0800 Subject: [PATCH] Add CMake-related Files for GitHub Codespace (#95) This PR introduces the CMake specific files that are required for the GitHub Codespace [3]. For more information about `.vscode/launch.json` use `IntelliSense` to learn about possible attributes and visit [1]. To customize the Codespace and run the right CMake configuration, we introduce `CMakePresets.json` [2]. Comments * Add codespace specific files * Ignore the output directory from codespace * Check pre-commit now * No comments are allowed with pre-commit in jsons * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Literature [1] https://go.microsoft.com/fwlink/?linkid=830387 [2] https://devblogs.microsoft.com/cppblog/customizing-github-codespaces-for-cpp-projects/ [3] https://code.visualstudio.com/docs/editor/debugging#_launch-configurations --- .gitignore | 3 ++ .vscode/launch.json | 4 ++ CMakePresets.json | 93 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 CMakePresets.json diff --git a/.gitignore b/.gitignore index 83f6fa19..b22a469e 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,6 @@ build-debug/* # IDE specific files egoa.sublime-workspace + +# GitHub Codespace specific files +out/* diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..eaae931a --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,4 @@ +{ + "configurations": [], + "version": "0.2.0" +} diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 00000000..7819efce --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,93 @@ +{ + "configurePresets": [ + { + "binaryDir": "${workspaceRoot}/out", + "cacheVariables": { + "BONMIN_ROOT_DIR": "NONE-DIR", + "Boost_DIRECTORIES": "/opt/homebrew/opt/boost/", + "Boost_NO_SYSTEM_PATHS": "TRUE", + "CMAKE_CXX_COMPILER": "/opt/homebrew/opt/llvm/bin/clang++", + "CMAKE_C_COMPILER": "/opt/homebrew/opt/llvm/bin/clang", + "CMAKE_INSTALL_PREFIX": "${workspaceRoot}/out/install/${presetName}", + "COIN_INCLUDE_DIR": "NONE-DIR", + "COIN_LIBRARY_DIR": "NONE-DIR", + "CPLEX_HOME": "NONE-DIR", + "EGOA_DOWNLOAD_CPPAD": "OFF", + "EGOA_DOWNLOAD_EIGEN": "ON", + "EGOA_DOWNLOAD_GOOGLE_TEST_FRAMEWORK": "ON", + "EGOA_DOWNLOAD_IEEE": "ON", + "EGOA_DOWNLOAD_PYPSA_EUR": "ON", + "EGOA_DOWNLOAD_PYPSA_ITI_COLLABORATION": "ON", + "EGOA_DOWNLOAD_SCIGRID": "ON", + "EGOA_DOWNLOAD_WINDFARM": "ON", + "EGOA_ENABLE_ASSERTION": "ON", + "EGOA_ENABLE_BONMIN": "OFF", + "EGOA_ENABLE_BOOST": "OFF", + "EGOA_ENABLE_CPLEX": "OFF", + "EGOA_ENABLE_DOCUMENTATION": "ON", + "EGOA_ENABLE_EXCEPTION_HANDLING": "ON", + "EGOA_ENABLE_GUROBI": "OFF", + "EGOA_ENABLE_IPOPT": "OFF", + "EGOA_ENABLE_OGDF": "OFF", + "EGOA_ENABLE_OPENMP": "OFF", + "EGOA_ENABLE_TESTS": "ON", + "EGOA_ENABLE_VERBOSE_MAKEFILE": "ON", + "EGOA_PEDANTIC_AS_ERRORS": "OFF", + "EGOA_PEDANTIC_MODE": "ON", + "EGOA_TEST_FRAMEWORK": "OfflineGoogleTestFramework", + "EGOA_TEST_FRAMEWORK_LOCATION": "external/GoogleTestFramework", + "EGOA_THREAD_LIMIT": "0", + "EGOA_WARNINGS_AS_ERRORS": "ON", + "GUROBI_ROOT_DIR": "NONE-DIR", + "OGDF_AUTOGEN_INCLUDE_DIR": "NONE-DIR", + "OGDF_INCLUDE_DIR": "NONE-DIR", + "OGDF_LIBRARY_DIR": "NONE-DIR", + "OPENMP_INCLUDES": "/opt/homebrew/opt/llvm/include", + "OPENMP_LIBRARIES": "/opt/homebrew/opt/llvm/lib" + }, + "generator": "Unix Makefiles", + "hidden": true, + "name": "base" + }, + { + "cacheVariables": { + "VCPKG_BUILD_BENCHMARKING": "On" + }, + "hidden": true, + "name": "benchmark-base" + }, + { + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "EGOA_BUILD_TYPE": "Debug" + }, + "displayName": "Debug", + "name": "debug" + }, + { + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release", + "EGOA_BUILD_TYPE": "Release" + }, + "displayName": "Release", + "name": "release" + }, + { + "displayName": "Debug + Benchmarks", + "inherits": [ + "debug", + "benchmark-base" + ], + "name": "debug-benchmarks" + }, + { + "displayName": "Release + Benchmarks", + "inherits": [ + "release", + "benchmark-base" + ], + "name": "release-benchmarks" + } + ], + "version": 3 +}