-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use compiler switches from Alire's configuration
Signed-off-by: onox <denkpadje@gmail.com>
- Loading branch information
Showing
7 changed files
with
50 additions
and
168 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 |
---|---|---|
@@ -1,31 +1,25 @@ | ||
.PHONY: build fast debug clean prove tests coverage | ||
.PHONY: build clean prove tests coverage | ||
|
||
build: | ||
cd json && alr build | ||
|
||
fast: | ||
cd json && alr build -- -XJSON_RUNTIME_CHECKS=none -XJSON_CONTRACTS=disabled | ||
|
||
debug: | ||
cd json && alr build -- -XJSON_BUILD_MODE=debug | ||
cd json && alr build --validation | ||
|
||
clean: | ||
-gnatprove --clean -P json/json.gpr | ||
-alr gnatprove --clean | ||
cd json && alr clean | ||
cd tests && alr clean | ||
rm -rf json/build tests/build tests/cov tests/TEST-*.xml | ||
rm -rf json/build tests/build tests/build/cov tests/TEST-*.xml | ||
|
||
prove: | ||
gnatprove -P json/json.gpr | ||
alr gnatprove | ||
|
||
tests: | ||
cd tests && alr build -- -XJSON_BUILD_MODE=coverage | ||
cd tests && alr build --development | ||
cd tests && alr run -s | ||
|
||
coverage: | ||
mkdir -p tests/cov | ||
lcov -q -c -d json/build/obj -d tests/build/obj -o tests/cov/unit.info | ||
lcov -q -r tests/cov/unit.info */adainclude/* -o tests/cov/unit.info | ||
lcov -q -r tests/cov/unit.info */tests/* -o tests/cov/unit.info | ||
genhtml -q --ignore-errors source -o tests/cov/html tests/cov/unit.info | ||
lcov -l tests/cov/unit.info | ||
mkdir -p tests/build/cov | ||
lcov -q -c -d json/build/obj -d tests/build/obj -o tests/build/cov/unit.info | ||
lcov -q -r tests/build/cov/unit.info */adainclude/* -o tests/build/cov/unit.info | ||
lcov -q -r tests/build/cov/unit.info */tests/* -o tests/build/cov/unit.info | ||
genhtml -q --ignore-errors source -o tests/build/cov/html tests/build/cov/unit.info | ||
lcov -l tests/build/cov/unit.info |
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 |
---|---|---|
@@ -1,23 +1,28 @@ | ||
with "json_config"; | ||
with "config/json_config"; | ||
|
||
project Json is | ||
project JSON is | ||
|
||
for Library_Name use "json"; | ||
for Library_Version use "5.0.0"; | ||
for Library_Name use "json-ada"; | ||
for Library_Version use Project'Library_Name & ".so." & Json_Config.Crate_Version; | ||
|
||
for Source_Dirs use ("src"); | ||
for Create_Missing_Dirs use "True"; | ||
|
||
for Object_Dir use "build/obj"; | ||
for Source_Dirs use ("src"); | ||
for Object_Dir use "build/obj/" & Json_Config.Build_Profile; | ||
for Library_Dir use "build/lib"; | ||
|
||
package Compiler extends JSON_Config.Compiler is | ||
type Library_Type_Type is ("relocatable", "static", "static-pic"); | ||
Library_Type : Library_Type_Type := | ||
external ("JSON_LIBRARY_TYPE", external ("LIBRARY_TYPE", "static")); | ||
for Library_Kind use Library_Type; | ||
|
||
package Compiler is | ||
for Default_Switches ("Ada") use Json_Config.Ada_Compiler_Switches & ("-gnatyM99"); | ||
for Local_Configuration_Pragmas use "gnat.adc"; | ||
end Compiler; | ||
|
||
package Binder renames JSON_Config.Binder; | ||
|
||
package Prove is | ||
for Proof_Switches ("Ada") use ("--checks-as-errors", "--level=4", "--no-axiom-guard", "--mode=check", "--prover=all", "--cwe", "--pedantic", "-k", "-j0", "--output-header"); | ||
end Prove; | ||
package Binder is | ||
for Switches ("Ada") use ("-Es"); -- Symbolic traceback | ||
end Binder; | ||
|
||
end Json; | ||
end JSON; |
This file was deleted.
Oops, something went wrong.
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