Skip to content
Merged
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
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ ifndef HAVE_RULES
HAVE_RULES=no
endif

ifdef SRCDIR
$(error Usage of SRCDIR to activate match compiler has been removed. Use MATCHCOMPILER=yes instead.)
endif
ifndef MATCHCOMPILER
MATCHCOMPILER=
endif
Expand All @@ -32,8 +29,10 @@ ifeq ($(MATCHCOMPILER),yes)
matchcompiler_S := $(shell $(PYTHON_INTERPRETER) tools/matchcompiler.py)
endif
libcppdir:=build
else
else ifeq ($(MATCHCOMPILER),)
libcppdir:=lib
else
$(error invalid MATCHCOMPILER value '$(MATCHCOMPILER)')
endif

ifndef CPPFLAGS
Expand Down
6 changes: 5 additions & 1 deletion cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ option(WARNINGS_ARE_ERRORS "Treat warnings as errors"
option(EXTERNALS_AS_SYSTEM "Treat externals as system includes" OFF)

set(USE_MATCHCOMPILER "Auto" CACHE STRING "Usage of match compiler")
set_property(CACHE USE_MATCHCOMPILER PROPERTY STRINGS Auto Off On Verify)
set(_MATCHCOMPILER_STRINGS Auto Off On Verify)

@c72578 c72578 Apr 25, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to readme.md this should be "ON" in capital letters. Same for "OFF".
Otherwise:
CMake Error at cmake/options.cmake:28 (message):
Invalid USE_MATCHCOMPILER value 'ON'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change was faulty - see also #6321.

I will post a PR fixing this tomorrow and mark it for backport.

set_property(CACHE USE_MATCHCOMPILER PROPERTY STRINGS ${_MATCHCOMPILER_STRINGS})
if (NOT ${USE_MATCHCOMPILER} IN_LIST _MATCHCOMPILER_STRINGS)
message(FATAL_ERROR "Invalid USE_MATCHCOMPILER value '${USE_MATCHCOMPILER}'")
endif()
if (USE_MATCHCOMPILER STREQUAL "Auto")
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
set(USE_MATCHCOMPILER_OPT "On")
Expand Down
1 change: 1 addition & 0 deletions releasenotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ Other:
- Using Visual Studio with CMake now checks if the CMake version is at least 3.13. This was always required but was not checked explicitly.
- Added '--template=simple'. It is expands to '{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]' without any additional location details.
- Removed deprecated platform type 'Unspecified'. Please use 'unspecified' instead.
- Removed deprecated 'Makefile' option 'SRCDIR'.
7 changes: 3 additions & 4 deletions tools/dmake/dmake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,6 @@ int main(int argc, char **argv)
fout << "# To compile with rules, use 'make HAVE_RULES=yes'\n";
makeConditionalVariable(fout, "HAVE_RULES", "no");

fout << "ifdef SRCDIR\n"
<< " $(error Usage of SRCDIR to activate match compiler has been removed. Use MATCHCOMPILER=yes instead.)\n"
<< "endif\n";
// avoid undefined variable
fout << "ifndef MATCHCOMPILER\n"
<< " MATCHCOMPILER=\n"
Expand All @@ -479,8 +476,10 @@ int main(int argc, char **argv)
<< " matchcompiler_S := $(shell $(PYTHON_INTERPRETER) tools/matchcompiler.py)\n"
<< " endif\n"
<< " libcppdir:=build\n"
<< "else\n"
<< "else ifeq ($(MATCHCOMPILER),)\n"
<< " libcppdir:=lib\n"
<< "else\n"
<< " $(error invalid MATCHCOMPILER value '$(MATCHCOMPILER)')\n"
<< "endif\n\n";

// avoid undefined variable
Expand Down