-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: switch windows config to be based on presets, simplify CMakeLists
- Loading branch information
1 parent
0f9afc9
commit e95b430
Showing
10 changed files
with
124 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,3 +120,6 @@ Standard: Latest | |
TabWidth: 4 | ||
UseTab: Never | ||
... | ||
--- | ||
Language: Json | ||
BasedOnStyle: llvm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,17 +16,13 @@ jobs: | |
submodules: recursive | ||
- uses: microsoft/[email protected] | ||
- name: Configure | ||
shell: bash | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. -G "Visual Studio 17 2022" -DCMAKE_INSTALL_PREFIX=$HOME/slang/ -DSLANG_INCLUDE_PYLIB=ON | ||
run: cmake --preset win64-release -DSLANG_INCLUDE_PYLIB=ON | ||
- name: Build | ||
run: msbuild build/INSTALL.vcxproj -m -p:configuration=release -p:platform=x64 | ||
run: cmake --build build --target install -j8 | ||
- name: Run tests | ||
run: | | ||
cd build | ||
ctest -C Release --output-on-failure | ||
ctest --output-on-failure | ||
build_macos: | ||
runs-on: macos-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
.vs/ | ||
.vscode/ | ||
.venv/ | ||
.idea/ | ||
build/ | ||
install/ | ||
compile_commands.json | ||
CMakeSettings.json | ||
*egg-info/ | ||
cmake-build-*/ | ||
prefix/ | ||
CMakeLists.txt.user | ||
CMakeUserPresets.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
"version": 3, | ||
"configurePresets": [ | ||
{ | ||
"name": "dev-mode", | ||
"hidden": true, | ||
"warnings": { | ||
"dev": true, | ||
"deprecated": true, | ||
"uninitialized": true, | ||
"unusedCli": true, | ||
"systemVars": false | ||
}, | ||
"errors": { | ||
"dev": true, | ||
"deprecated": true | ||
} | ||
}, | ||
{ | ||
"name": "windows-base", | ||
"hidden": true, | ||
"generator": "Ninja", | ||
"binaryDir": "${sourceDir}/build/${presetName}", | ||
"installDir": "${sourceDir}/install/${presetName}", | ||
"cacheVariables": { | ||
"CMAKE_CXX_COMPILER": "cl.exe", | ||
"CMAKE_CXX_FLAGS": "/nologo /DWIN32 /D_WINDOWS /MP /W4 /WX /utf-8 /external:anglebrackets /external:W0 /permissive- /volatile:iso /Zc:inline /Zc:preprocessor /EHsc /Zc:__cplusplus /Zc:externConstexpr /Zc:throwingNew" | ||
}, | ||
"condition": { | ||
"type": "equals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Windows" | ||
} | ||
}, | ||
{ | ||
"name": "windows-debug", | ||
"hidden": true, | ||
"inherits": "windows-base", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug", | ||
"CMAKE_CXX_FLAGS_DEBUG": "/MDd /Zi /Ob0 /Od /RTC1", | ||
"CMAKE_EXE_LINKER_FLAGS_DEBUG": "/nologo /DEBUG:FASTLINK", | ||
"CMAKE_SHARED_LINKER_FLAGS_DEBUG": "/nologo /DEBUG:FASTLINK" | ||
} | ||
}, | ||
{ | ||
"name": "windows-release", | ||
"hidden": true, | ||
"inherits": "windows-base", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Release", | ||
"CMAKE_CXX_FLAGS_RELEASE": "/MD /O2 /Ob3 /GS- /DNDEBUG" | ||
} | ||
}, | ||
{ | ||
"name": "win64-debug", | ||
"displayName": "Win64 Debug", | ||
"inherits": "windows-debug", | ||
"architecture": { | ||
"value": "x64", | ||
"strategy": "external" | ||
} | ||
}, | ||
{ | ||
"name": "win64-release", | ||
"displayName": "Win64 Release", | ||
"inherits": "windows-release", | ||
"architecture": { | ||
"value": "x64", | ||
"strategy": "external" | ||
} | ||
}, | ||
{ | ||
"name": "win32-debug", | ||
"displayName": "Win32 Debug", | ||
"inherits": "windows-debug", | ||
"architecture": { | ||
"value": "x86", | ||
"strategy": "external" | ||
} | ||
}, | ||
{ | ||
"name": "win32-release", | ||
"displayName": "Win32 Release", | ||
"inherits": "windows-release", | ||
"architecture": { | ||
"value": "x86", | ||
"strategy": "external" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters