Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@phcerdan
Created August 21, 2018 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phcerdan/ee005812a62753214124783ee4e14256 to your computer and use it in GitHub Desktop.
Save phcerdan/ee005812a62753214124783ee4e14256 to your computer and use it in GitHub Desktop.
ale clangtidy with headers using https://github.com/phcerdan/ALE
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)
#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;
}
#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