Created
August 21, 2018 18:45
-
-
Save phcerdan/ee005812a62753214124783ee4e14256 to your computer and use it in GitHub Desktop.
ale clangtidy with headers using https://github.com/phcerdan/ALE
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
cmake_minimum_required(VERSION 3.1) | |
project(ale_test) | |
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Generate compile_commands.json") | |
add_executable(main main.cpp) |
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
#include <iostream> | |
#include <typeinfo> | |
// In this header set: | |
// let b:ale_cpp_clangtidy_header_sourcefile='main.cpp' | |
template<typename T> | |
void hello() { | |
std::cout << "Hola!" << std::endl; | |
std::cout << "type name:" << typeid(T).name() << std::endl; | |
} |
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
#include "header.h" | |
int main() | |
{ | |
hello<int>(); | |
hello<double>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment