Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set(CMAKE_CXX_STANDARD 11)

option(RUNCPP2_UPDATE_DEFAULT_YAMLS "Update default yaml files" OFF)

set(RUNCPP2_CONFIG_VERSION "1" CACHE STRING "Default Config Version")
set(RUNCPP2_CONFIG_VERSION "2")

if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
option(RUNCPP2_WARNINGS_AS_ERRORS "Treat warnings as errors" ON)
Expand Down
234 changes: 133 additions & 101 deletions DefaultYAMLs/Default/g++.yaml

Large diffs are not rendered by default.

78 changes: 39 additions & 39 deletions DefaultYAMLs/Default/vs2022_v17+.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
# DO NOT modify this file. Changes will be overwritten when there's a reset or update

# List of anchors that will be aliased later. `Template` is **NOT** part of a profile
# List of YAML anchors that will be aliased later. `Template` is **NOT** part of a profile
Templates:
vs2022_v17+_CompileFlags: &vs2022_v17+_CompileFlags
Flags: "/nologo /W4 /diagnostics:caret /utf-8 /Gm- /MDd /EHar /TP /std:c++17 /GR /RTC1 /Zc:inline /Zi"
"vs2022_v17+_CompileRunParts": &vs2022_v17+_CompileRunParts
- Type: Once
CommandPart: "{Executable} /c {CompileFlags}"
- Type: Repeats
CommandPart: " /D{DefineNameOnly}="
- Type: Repeats
CommandPart: " \"/D{DefineName}={DefineValue}\""
- Type: Repeats
CommandPart: " /I\"{IncludeDirectoryPath}\""
- Type: Once
CommandPart: " /Fo\"{OutputFileDirectory}{/}{ObjectLinkFile.Prefix}{InputFileName}{ObjectLinkFile.Extension}\" \
/Fd\"{OutputFileDirectory}{/}{DebugSymbolFile.Prefix}{InputFileName}{DebugSymbolFile.Extension}\" \
\"{InputFilePath}\""
"vs2022_v17+_CompileExpectedOutputFiles": &vs2022_v17+_CompileExpectedOutputFiles
- "{OutputFileDirectory}{/}{ObjectLinkFile.Prefix}{InputFileName}{ObjectLinkFile.Extension}"
- "{OutputFileDirectory}{/}{DebugSymbolFile.Prefix}{InputFileName}{DebugSymbolFile.Extension}"
Flags: "/nologo /W4 /diagnostics:caret /utf-8 /Gm- /MDd /EHar /TP /std:c++17 /GR /RTC1 /Zc:inline /Zi /external:W0"

# https://learn.microsoft.com/en-us/cpp/overview/compiler-versions?view=msvc-170
Name: "vs2022_v17+"
Expand All @@ -46,8 +30,24 @@ Compiler:
Windows:
<<: *vs2022_v17+_CompileFlags
Executable: "CL.exe"
RunParts: *vs2022_v17+_CompileRunParts
ExpectedOutputFiles: *vs2022_v17+_CompileExpectedOutputFiles
RunParts: &vs2022_v17+_CompileRunParts
- Type: Once
CommandPart: "{Stage.Executable} /c {Stage.CompileFlags}"
- Type: Repeats
CommandPart: " /D{Stage.DefineNameOnly}="
- Type: Repeats
CommandPart: " \"/D{Stage.DefineName}={Stage.DefineValue}\""
- Type: Repeats
CommandPart: " /external:I\"{Stage.IncludeDirectory.Dep.Path}\""
- Type: Repeats
CommandPart: " /I\"{Stage.IncludeDirectory.Source.Path}\""
- Type: Once
CommandPart: " /Fo\"{Stage.Output.Directory}{/}{Stage.ObjectLinkFile.Prefix}{Stage.Input.Name}{Stage.ObjectLinkFile.Extension}\" \
/Fd\"{Stage.Output.Directory}{/}{Stage.DebugSymbolFile.Prefix}{Stage.Input.Name}{Stage.DebugSymbolFile.Extension}\" \
\"{Stage.Input.Path}\""
ExpectedOutputFiles: &vs2022_v17+_CompileExpectedOutputFiles
- "{Stage.Output.Directory}{/}{Stage.ObjectLinkFile.Prefix}{Stage.Input.Name}{Stage.ObjectLinkFile.Extension}"
- "{Stage.Output.Directory}{/}{Stage.DebugSymbolFile.Prefix}{Stage.Input.Name}{Stage.DebugSymbolFile.Extension}"
ExecutableShared:
Windows:
<<: *vs2022_v17+_CompileFlags
Expand Down Expand Up @@ -82,11 +82,11 @@ Linker:
RunParts:
- Type: Once
CommandPart: >-
{Executable} {LinkFlags}
/OUT:"{OutputFileDirectory}{/}{OutputFileName}.exe"
{Stage.Executable} {Stage.LinkFlags}
/OUT:"{Stage.Output.Directory}{/}{Stage.Output.Name}.exe"
- Type: Repeats
CommandPart: " \"{LinkFilePath}\""
ExpectedOutputFiles: ["{OutputFileDirectory}{/}{OutputFileName}.exe"]
CommandPart: " \"{Stage.Input.Path}\""
ExpectedOutputFiles: ["{Stage.Output.Directory}{/}{Stage.Output.Name}.exe"]
ExecutableShared:
Windows:
Flags: >-
Expand All @@ -97,13 +97,13 @@ Linker:
RunParts:
- Type: Once
CommandPart: >-
{Executable} {LinkFlags}
/OUT:"{OutputFileDirectory}{/}{SharedLibraryFile.Prefix}{OutputFileName}{SharedLibraryFile.Extension}"
/IMPLIB:"{OutputFileDirectory}{/}{SharedLinkFile.Prefix}{OutputFileName}{SharedLinkFile.Extension}"
{Stage.Executable} {Stage.LinkFlags}
/OUT:"{Stage.Output.Directory}{/}{Stage.SharedLibraryFile.Prefix}{Stage.Output.Name}{Stage.SharedLibraryFile.Extension}"
/IMPLIB:"{Stage.Output.Directory}{/}{Stage.SharedLinkFile.Prefix}{Stage.Output.Name}{Stage.SharedLinkFile.Extension}"
/DEF:".\temp.def"
- Type: Repeats
CommandPart: " \"{LinkFilePath}\""
ExpectedOutputFiles: ["{OutputFileDirectory}{/}{SharedLibraryFile.Prefix}{OutputFileName}{SharedLibraryFile.Extension}"]
CommandPart: " \"{Stage.Input.Path}\""
ExpectedOutputFiles: ["{Stage.Output.Directory}{/}{Stage.SharedLibraryFile.Prefix}{Stage.Output.Name}{Stage.SharedLibraryFile.Extension}"]
Setup: [ "echo EXPORTS > .\\temp.def", "echo. main @1 >> .\\temp.def" ]
Cleanup: [ "del .\\temp.def" ]
Static:
Expand All @@ -113,12 +113,12 @@ Linker:
RunParts:
- Type: Once
CommandPart: >-
{Executable} {LinkFlags}
/OUT:"{OutputFileDirectory}{/}{StaticLinkFile.Prefix}{OutputFileName}{StaticLinkFile.Extension}"
/IMPLIB:"{OutputFileDirectory}{/}{SharedLinkFile.Prefix}{OutputFileName}{SharedLinkFile.Extension}"
{Stage.Executable} {Stage.LinkFlags}
/OUT:"{Stage.Output.Directory}{/}{Stage.StaticLinkFile.Prefix}{Stage.Output.Name}{Stage.StaticLinkFile.Extension}"
/IMPLIB:"{Stage.Output.Directory}{/}{Stage.SharedLinkFile.Prefix}{Stage.Output.Name}{Stage.SharedLinkFile.Extension}"
- Type: Repeats
CommandPart: " \"{LinkFilePath}\""
ExpectedOutputFiles: ["{OutputFileDirectory}{/}{StaticLinkFile.Prefix}{OutputFileName}{StaticLinkFile.Extension}"]
CommandPart: " \"{Stage.Input.Path}\""
ExpectedOutputFiles: ["{Stage.Output.Directory}{/}{Stage.StaticLinkFile.Prefix}{Stage.Output.Name}{Stage.StaticLinkFile.Extension}"]
Shared:
Windows:
Flags: >-
Expand All @@ -129,9 +129,9 @@ Linker:
RunParts:
- Type: Once
CommandPart: >-
{Executable} {LinkFlags}
/OUT:"{OutputFileDirectory}{/}{SharedLibraryFile.Prefix}{OutputFileName}{SharedLibraryFile.Extension}"
/IMPLIB:"{OutputFileDirectory}{/}{SharedLinkFile.Prefix}{OutputFileName}{SharedLinkFile.Extension}"
{Stage.Executable} {Stage.LinkFlags}
/OUT:"{Stage.Output.Directory}{/}{Stage.SharedLibraryFile.Prefix}{Stage.Output.Name}{Stage.SharedLibraryFile.Extension}"
/IMPLIB:"{Stage.Output.Directory}{/}{Stage.SharedLinkFile.Prefix}{Stage.Output.Name}{Stage.SharedLinkFile.Extension}"
- Type: Repeats
CommandPart: " \"{LinkFilePath}\""
ExpectedOutputFiles: ["{OutputFileDirectory}{/}{SharedLibraryFile.Prefix}{OutputFileName}{SharedLibraryFile.Extension}"]
CommandPart: " \"{Stage.Input.Path}\""
ExpectedOutputFiles: ["{Stage.Output.Directory}{/}{Stage.SharedLibraryFile.Prefix}{Stage.Output.Name}{Stage.SharedLibraryFile.Extension}"]
2 changes: 2 additions & 0 deletions Src/Tests/Data/ProfileTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ DS::Result<void> TestMain()
CommandPart: "{Executable} -c {CompileFlags}"
- Type: Repeats
CommandPart: " -I\"{IncludeDirectoryPath}\""
Separator: " "
- Type: Once
CommandPart: " \"{InputFilePath}\" -o \"{OutputFilePath}\""
ExpectedOutputFiles: ["TestOutputFile", "TestOutputFile2"]
Expand Down Expand Up @@ -199,6 +200,7 @@ DS::Result<void> TestMain()
DS_ASSERT_EQ(executableCompile.Flags, "-std=c++17 -Wall -g");
DS_ASSERT_EQ(executableCompile.Executable, "g++");
DS_ASSERT_EQ(executableCompile.RunParts.size(), 3);
DS_ASSERT_EQ(executableCompile.RunParts[1].Separator, " ");
DS_ASSERT_EQ(executableCompile.ExpectedOutputFiles.size(), 2);

//Verify Compiler ExecutableShared
Expand Down
Loading