Skip to content

Commit

Permalink
Run tests with c++20 (temporary)
Browse files Browse the repository at this point in the history
  • Loading branch information
MihailMihov committed Oct 3, 2024
1 parent 293b44d commit bf49849
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions test/ForwardMode/MemberFunctions.C
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// RUN: %cladclang %s -I%S/../../include -oMemberFunctions.out 2>&1 | %filecheck %s
// RUN: ./MemberFunctions.out | %filecheck_exec %s
// RUN: %cladclang -std=c++14 %s -I%S/../../include -oMemberFunctions-cpp14.out 2>&1 | %filecheck %s
// RUN: ./MemberFunctions-cpp14.out | %filecheck_exec %s
// RUN: %cladclang -std=c++17 %s -I%S/../../include -oMemberFunctions-cpp17.out 2>&1 | %filecheck %s
// RUN: ./MemberFunctions-cpp17.out | %filecheck_exec %s
// RUN: %cladclang -std=c++20 %s -I%S/../../include -oMemberFunctions-cpp20.out 2>&1 | %filecheck %s
// RUN: ./MemberFunctions-cpp20.out | %filecheck_exec %s

#include "clad/Differentiator/Differentiator.h"

Expand Down
6 changes: 3 additions & 3 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -253,17 +253,17 @@ if not lit_config.quiet:
lit.util.usePlatformSdkOnDarwin(config, lit_config)

#Start clad forwarding to:
#clang -std=c++11 some-input-file.c -Xclang -add-plugin -Xclang ad -Xclang
#clang -std=c++20 some-input-file.c -Xclang -add-plugin -Xclang ad -Xclang
#\ -plugin-arg-ad -Xclang -fdump-derived-fn -Xclang -load -Xclang../../Debug+Asserts/lib/libclad.so
#FIXME: we need to introduce a better way to check compatible version of clang, propagating
#-fvalidate-clang-version flag is not enough.
flags = ' -Xclang -add-plugin -Xclang clad -Xclang \
-plugin-arg-clad -Xclang -fdump-derived-fn -Xclang \
-load -Xclang ' + config.cladlib

config.substitutions.append( ('%cladclang_cuda', config.clang + ' -std=c++17' + flags) )
config.substitutions.append( ('%cladclang_cuda', config.clang + ' -std=c++20' + flags) )

config.substitutions.append( ('%cladclang', config.clang + '++ -DCLAD_NO_NUM_DIFF ' + ' -std=c++14' + flags) )
config.substitutions.append( ('%cladclang', config.clang + '++ -DCLAD_NO_NUM_DIFF ' + ' -std=c++20' + flags) )

config.substitutions.append( ('%cladlib', config.cladlib) )

Expand Down

0 comments on commit bf49849

Please sign in to comment.